package domin;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
@Setter
@Getter
@Slf4j
@AllArgsConstructor
@NoArgsConstructor
public final class Users implements Comparable<Users>,Serializable{
    private Integer id;
    private String username;
    private String password;
    private Actor actor;


    public Users(String name, String password, Actor actor) {
        this.username = name;
        this.password=password;
        this.actor =actor;
    }

    @Override
    public int compareTo(Users o) {
        // TODO Auto-generated method stub
        return this.id - o.id;
    }
    public String toString()
    {
        final String TAB = "    ";

        String retValue = "";

        retValue = "Title ( "
                + super.toString() + TAB
                + "id = " + this.id + TAB
                + "username = " + this.username + TAB
                + "password = " + this.password + TAB
                + "actor = " + this.actor + TAB
                + " )";

        return retValue;
    }
    public String getUsername(){
        return username;
    }
    public String getPassword(){
        return password;
    }

}
